<template>
  <div id="app">
    <nav class="navbar">
      <router-link to="/home">
        <div class="ind">
          <div class="Logo"></div>
          <h1 style="margin: 0;">双碳招投标网</h1>
        </div>
      </router-link>
      <div v-for="(item, index) in navData" :key="index">
        <router-link :to="item.path">{{ item.title }}</router-link>
      </div>
      <router-link to="/selfdo">
        <div class="inde">
          <div class="admin"></div>
          <h2>admin</h2>
        </div>
      </router-link>
    </nav>
    <router-view>
    </router-view>
  </div>
</template>

<script>
import { ref } from 'vue'; // 引入 ref
import { navData } from '@/untils/nav'; // 导入导航数据

export default {
  name: 'App',
  components: {
    
  },
  setup() {
    const navDataRef = ref(navData);

    return {
      navData: navDataRef
    };
  }
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

.navbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #f8f9fa;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}


.navbar a {
  text-decoration: none;
  color: #2c3e50;
  margin: 0 1rem;
}

.navbar a:hover {
  color: #007bff;
}

.threeimg{
  display: flex;
  justify-content: space-around;
  align-items: center;
}
</style>
